
********************REPLICATION CODE FOR:************************************************************
********Integrating Research Methods Training Into Elective Courses in an Undergraduate Curriculum***
****************Gizem Arikan and Đođre Milosav*******************************************************


*************************************************************************************************************
******************************Replicating Results from Table 2***********************************************
*************************************************************************************************************
**********************Surveys on Students Responses and Their Self-Percetion on Knowledge********************
****************of and Confidence With Research Skills at the Begining and the End of the Term.**************
*************************************************************************************************************
*************************************************************************************************************
*************************************************************************************************************
*************************************************************************************************************



***DATA CLEANUP***

clear

cd "SET YOUR WORKING DIRECTORY HERE"


***Survey data from the begining of the module***


import delimited "survey_1_raw.csv", rowrange(9) colrange(18)

rename q1 rd_course_past
rename q2 qual_course_past
rename q3 rd_course_this_term
rename q4_1 skill_reading_articles
rename q4_2 skill_evaluate_evidence
rename q4_3 skill_form_rq
rename q4_4 skill_form_hyp
rename q4_5 skill_method_rq
rename q4_6 skill_method_strong_weak
rename q5_1 conf_read_quant
rename q5_2 conf_evidence_eval
rename q5_3 conf_form_rq
rename q5_4 conf_form_hyp
rename q5_5 conf_method_rq
rename q5_6 conf_method_strong_weak
rename q5_7 conf_writing_skills
rename q5_8 conf_study_skills
rename q6 age
rename q7 gender
rename q9 eng_prof
rename q10 quant_course_past
rename q11 major

replace age = "21" in 24
destring age, replace

gen before_after=0

drop q1_3_text q2_3_text q10_3_text q3_3_text

save data_survey_1, replace

***Survey data from the end of the module***

clear 
import delimited "survey_2_raw.csv", rowrange(9) colrange(18)


rename q1 rd_course_past
rename q2 qual_course_past
rename q4_1 skill_reading_articles
rename q4_2 skill_evaluate_evidence
rename q4_3 skill_form_rq
rename q4_4 skill_form_hyp
rename q4_5 skill_method_rq
rename q4_6 skill_method_strong_weak
rename q5_1 conf_read_quant
rename q5_2 conf_evidence_eval
rename q5_3 conf_form_rq
rename q5_4 conf_form_hyp
rename q5_5 conf_method_rq
rename q5_6 conf_method_strong_weak
rename q5_7 conf_writing_skills
rename q5_8 conf_study_skills
rename q6 age
rename q7 gender
rename q9 eng_prof
rename q10 quant_course_past
rename q11 major
rename q12 comments_suggestions
rename q13 helpful_lectures
rename q14 helpful_tutorials




drop q1_3_text q2_3_text q10_3_text

gen before_after=1

save data_survey_2, replace

use data_survey_2


***Merging data from two surveys 

append using data_survey_1


save data_surveys_merged, replace



use data_surveys_merged.dta 


***Reverse code the confidence variables so higher values indicate more confidence

revrs conf_read_quant

revrs conf_evidence_eval

revrs conf_form_rq

revrs conf_form_hyp

revrs conf_method_rq

revrs conf_method_strong_weak

revrs conf_writing_skills

revrs conf_study_skills


***checking if everything is in order
tab conf_read_quant revconf_read_quant




***We manualy coded the major_coded variable in the data editor and saved the dataset so that 1 indicates "Political Science Major", 2 "Political Science and an  additional major (double major)" and 3 "Other Major"


label define major_coded 1 "PS" 2 "PS double Major" 3 "Other Major"
label values major_coded major_coded


*** Create a student_id variable
gen student_id = _n


*** Reverse code the indicator on whether it's survey 1 or survey 2

revrs before_after

gen after_before =.

replace after_before = revbefore_after

save survey_data_final, replace 





***************************************
*************ANALYSIS******************
***************************************
***************************************


*******************************************************
*********Full Sample***********************************
*******************************************************


*******************************************************
*******************************************************
****T tests of student self-perception on learning*****
*******************************************************
*******************************************************
*******************************************************

clear
use survey_data_final





ttest skill_reading_articles, by(after_before)

ttest skill_evaluate_evidence, by(after_before)

ttest skill_form_rq, by(after_before)

ttest skill_form_hyp, by(after_before)

ttest skill_method_rq, by(after_before)

ttest skill_method_strong_weak, by(after_before)



estpost ttest skill_reading_articles skill_evaluate_evidence skill_form_rq skill_form_hyp skill_method_rq skill_method_strong_weak, by(after_before)


esttab using Learning.rtf, wide replace


*******************************************************
*******************************************************
*******************************************************
****T test of student self-perception on confidence****
*******************************************************
*******************************************************
*******************************************************



ttest revconf_read_quant, by(after_before)

ttest revconf_evidence_eval, by(after_before)

ttest revconf_form_rq, by(after_before)

ttest revconf_form_hyp, by(after_before)

ttest revconf_method_rq, by(after_before)

ttest revconf_method_strong_weak, by(after_before)

ttest revconf_writing_skills, by(after_before)

ttest revconf_study_skills, by(after_before)




estpost ttest revconf_read_quant revconf_evidence_eval revconf_form_rq revconf_form_hyp revconf_method_rq revconf_method_strong_weak revconf_writing_skills revconf_study_skills, by(after_before)

esttab using Confidence.rft, wide replace


*************************************************************************************************************
*************************************************************************************************************
*********Looking at the results for those who have the RM background and those who do not separately********
*************************************************************************************************************
*************************************************************************************************************
*************************************************************************************************************

*************************************************************************************************************
*************************************************************************************************************
**********Students with experience***************************************************************************
*************************************************************************************************************
*************************************************************************************************************

drop if rd_course_past !=1

save students_with_rm_experience, replace




*******************************************************
*******************************************************
****T tests of student self-perception on learning*****
***********for students with experience****************
*******************************************************
*******************************************************



ttest skill_reading_articles, by(after_before)

ttest skill_evaluate_evidence, by(after_before)

ttest skill_form_rq, by(after_before)

ttest skill_form_hyp, by(after_before)

ttest skill_method_rq, by(after_before)

ttest skill_method_strong_weak, by(after_before)


estpost ttest skill_reading_articles skill_evaluate_evidence skill_form_rq skill_form_hyp skill_method_rq skill_method_strong_weak, by(after_before)


esttab using Learning_with_rd_experience.rtf, wide replace


*******************************************************
*******************************************************
****T tests of student self-perception on confidence***
***********for students with experience****************
*******************************************************
*******************************************************



ttest revconf_read_quant, by(after_before)


ttest revconf_evidence_eval, by(after_before)


ttest revconf_form_rq, by(after_before)


ttest revconf_form_hyp, by(after_before)


ttest revconf_method_rq, by(after_before)


ttest revconf_method_strong_weak, by(after_before)


ttest revconf_writing_skills, by(after_before)


ttest revconf_study_skills, by(after_before)


estpost ttest revconf_read_quant revconf_evidence_eval revconf_form_rq revconf_form_hyp revconf_method_rq revconf_method_strong_weak revconf_writing_skills revconf_study_skills, by(after_before)

esttab using Confidence_with_experience.rft, wide replace




*************************************************************************************************************
*************************************************************************************************************
**********Students without experience***************************************************************************
*************************************************************************************************************
*************************************************************************************************************




clear

use survey_data_final

keep if rd_course_past ==2

save students_without_rm_experience, replace


*******************************************************
*******************************************************
****T tests of student self-perception on learning*****
***********for students without experience*************
*******************************************************
*******************************************************


ttest skill_reading_articles, by(after_before)

ttest skill_evaluate_evidence, by(after_before)

ttest skill_form_rq, by(after_before)

ttest skill_form_hyp, by(after_before)

ttest skill_method_rq, by(after_before)

ttest skill_method_strong_weak, by(after_before)

estpost ttest skill_reading_articles skill_evaluate_evidence skill_form_rq skill_form_hyp skill_method_rq skill_method_strong_weak, by(after_before)


esttab using Learning_without_rd_experience.rtf, wide replace




*******************************************************
*******************************************************
****T tests of student self-perception on confidence***
***********for students without experience*************
*******************************************************
*******************************************************




ttest revconf_read_quant, by(after_before)


ttest revconf_evidence_eval, by(after_before)


ttest revconf_form_rq, by(after_before)


ttest revconf_form_hyp, by(after_before)


ttest revconf_method_rq, by(after_before)


ttest revconf_method_strong_weak, by(after_before)


ttest revconf_writing_skills, by(after_before)


ttest revconf_study_skills, by(after_before)

estpost ttest revconf_read_quant revconf_evidence_eval revconf_form_rq revconf_form_hyp revconf_method_rq revconf_method_strong_weak revconf_writing_skills revconf_study_skills, by(after_before)

esttab using Confidence_without_experience.rft, wide replace




